﻿using CsvHelper.Configuration;
using System;
using System.Collections.Generic;
using System.Text;

namespace FireBillBook.Core.Models.ImportMaps
{
    public class WechatPaymentRecordMap : ClassMap<OriginalDatas.WechatPaymentOriginalData>
    {
        private const string TradingCodeTitle = "交易单号";
        private const string OrderCodeTitle = "商户单号";
        private const string TradingTimeTitle = "交易时间";
        private const string PaymentWayTitle = "支付方式";
        private const string TradingTypeTitle = "交易类型";
        private const string TradingTargetTitle = "交易对方";
        private const string IncomeOrExpensesTitle = "收/支";
        private const string TradingAmountTitle = "金额(元)";
        private const string ItemNameTitle = "商品";
        private const string TradingStatusTitle = "当前状态";
        private const string RemarkTitle = "备注";

        public WechatPaymentRecordMap()
        {
            Map(a => a.TradingCode).Name(TradingCodeTitle);
            Map(a => a.OrderCode).Name(OrderCodeTitle);
            Map(a => a.TradingTime).Name(TradingTimeTitle);
            Map(a => a.PaymentWay).Name(PaymentWayTitle);
            Map(a => a.TradingType).Name(TradingTypeTitle);
            Map(a => a.TradingTarget).Name(TradingTargetTitle);
            Map(a => a.IncomeOrExpenses).Name(IncomeOrExpensesTitle).TypeConverter<FundDirectionConverter>();
            Map(a => a.TradingAmount).Name(TradingAmountTitle);
            Map(a => a.ItemName).Name(ItemNameTitle);
            Map(a => a.TradingStatus).Name(TradingStatusTitle);
            Map(a => a.Remark).Name(RemarkTitle);
        }
    }
}
